/* 登录页面增强样式 */

/* 按钮加载状态 */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 验证码按钮样式 */
.send-sms-btn {
    min-width: 100px;
    white-space: nowrap;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-sms-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.send-sms-btn:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
}

.sms-countdown {
    color: #6c757d;
    font-size: 12px;
}

/* 消息提示样式 */
.message {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-success {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.message-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.message-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.message-info {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

/* 二维码模态框样式 */
.qr-modal {
    backdrop-filter: blur(4px);
}

.qr-modal-content {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    max-width: 350px;
    width: 90%;
}

.qr-modal-content h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.qr-modal-content p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.qr-code {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

/* 表单验证样式 */
.form-input.error {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

.form-input.success {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.error-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.error-message i {
    font-size: 10px;
}

/* 登录方式切换增强 */
.login-tabs {
    margin-bottom: 24px;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 4px;
    display: flex;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
    background: white;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 社交登录按钮增强 */
.social-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-btn {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-btn.wechat:hover {
    border-color: #07c160;
    color: #07c160;
}

.social-btn.qq:hover {
    border-color: #12b7f5;
    color: #12b7f5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-card {
        margin: 20px;
        padding: 24px;
    }
    
    .login-tabs {
        flex-direction: column;
        gap: 2px;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .social-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .social-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .qr-modal-content {
        margin: 20px;
        padding: 20px;
    }
    
    .qr-code {
        width: 180px;
        height: 180px;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 表单组增强 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 12px;
    color: #999;
    font-size: 16px;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-input::placeholder {
    color: #999;
}

/* 密码显示切换按钮 */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #666;
}

/* 记住我选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #2196f3;
    border-color: #2196f3;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: #2196f3;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #1976d2;
    text-decoration: underline;
} 